feat: increase default poll interval for long running actions#1364
feat: increase default poll interval for long running actions#1364
Conversation
If an actions takes more than 5 seconds, gradually increase the poll interval from 500ms to a maximum of 2.5s.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1364 +/- ##
==========================================
- Coverage 72.57% 72.56% -0.01%
==========================================
Files 300 300
Lines 10989 11004 +15
==========================================
+ Hits 7975 7985 +10
- Misses 2125 2128 +3
- Partials 889 891 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Too many tickets about API rate limit increase show a huge amount of request coming from the CLI polling for running actions. This changes the default with the hope to keep the CLI snappy for fast running actions, but without exhausting all the API requests for long running actions. The exponential backoff function being capped to max 2.5s, it should still feel "snappy" even for long running actions, while cutting the amount of API request by ~x5. |
Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
By default, if an actions takes more than 5 seconds, gradually increase the poll interval from 500ms to a maximum of 2.5s.
This will reduce the amount of API request made for long running actions, also reducing the chances to run into the API requests rate limit.
If you need a constant poll interval, consider setting the
--poll-intervalflag to the desired value.